package com.qujia.integral.domain;

import com.qujia.common.annotation.Excel;
import com.qujia.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.List;

/**
 * 【请填写功能名称】对象 integral_rule_detail
 *
 * @author qujia
 * @date 2021-03-09
 */
public class IntegralRuleDetail extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    private Long id;

    /** 规则主表主键id */
    @Excel(name = "规则主表主键id")
    private Long parentId;

    /** 规则满足条件（满足多少升，多少元） */
    @Excel(name = "规则满足条件", readConverterExp = "满=足多少升，多少元")
    private BigDecimal ruleTerms;

    /** 会员等级 */
    @Excel(name = "会员等级")
    private String grade;

    /** 油品名称 */
    @Excel(name = "油品名称")
    private String oilName;

    /** 每消费金额 */
    @Excel(name = "每消费金额")
    private BigDecimal saleAmt;

    /** 兑换积分 */
    @Excel(name = "兑换积分")
    private BigDecimal integral;

    /** 规则类型 */
    @Excel(name = "规则类型")
    private String ruleType;
    private String oilType;

    /** 规则类型 */
    @Excel(name = "成长值")
    private Long growValue;

    /** 油品id */
    private Long oilId;

    /** 每消费金额 */
    @Excel(name = "现金积分")
    private BigDecimal cashIntegral;

    //永久有效 permanent_validity/指定时间 specify_time/每日重复 daily_repeat/每周重复 weekly_repeat/每月重复 monthly_repeat
    private String effectiveTimeType;
    public static final String EFFECTIVETIMETYPE_PERMANENT_VALIDITY="permanent_validity";
    public static final String EFFECTIVETIMETYPE_SPECIFY_TIME="specify_time";
    public static final String EFFECTIVETIMETYPE_DAILY_REPEAT="daily_repeat";
    public static final String EFFECTIVETIMETYPE_WEEKLY_REPEAT="weekly_repeat";
    public static final String EFFECTIVETIMETYPE_MONTHLY_REPEAT="monthly_repeat";

    private String weeklySelection;
    private String monthlySelection;

    private List<IntegralTimeRuleDetail> integralTimeRuleDetails;

    public List<IntegralTimeRuleDetail> getIntegralTimeRuleDetails() {
        return integralTimeRuleDetails;
    }

    public void setIntegralTimeRuleDetails(List<IntegralTimeRuleDetail> integralTimeRuleDetails) {
        this.integralTimeRuleDetails = integralTimeRuleDetails;
    }

    public String getEffectiveTimeType() {
        return effectiveTimeType;
    }

    public void setEffectiveTimeType(String effectiveTimeType) {
        this.effectiveTimeType = effectiveTimeType;
    }

    public String getWeeklySelection() {
        return weeklySelection;
    }

    public void setWeeklySelection(String weeklySelection) {
        this.weeklySelection = weeklySelection;
    }

    public String getMonthlySelection() {
        return monthlySelection;
    }

    public void setMonthlySelection(String monthlySelection) {
        this.monthlySelection = monthlySelection;
    }

    public BigDecimal getCashIntegral() {
        return cashIntegral;
    }

    public void setCashIntegral(BigDecimal cashIntegral) {
        this.cashIntegral = cashIntegral;
    }

    public Long getOilId() {
        return oilId;
    }

    public void setOilId(Long oilId) {
        this.oilId = oilId;
    }

    public Long getGrowValue() {
        return growValue;
    }

    public void setGrowValue(Long growValue) {
        this.growValue = growValue;
    }


    public String getOilType() {
        return oilType;
    }

    public void setOilType(String oilType) {
        this.oilType = oilType;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public Long getParentId()
    {
        return parentId;
    }
    public void setRuleTerms(BigDecimal ruleTerms)
    {
        this.ruleTerms = ruleTerms;
    }

    public BigDecimal getRuleTerms()
    {
        return ruleTerms;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public void setOilName(String oilName)
    {
        this.oilName = oilName;
    }

    public String getOilName()
    {
        return oilName;
    }
    public void setSaleAmt(BigDecimal saleAmt)
    {
        this.saleAmt = saleAmt;
    }

    public BigDecimal getSaleAmt()
    {
        return saleAmt;
    }
    public void setIntegral(BigDecimal integral)
    {
        this.integral = integral;
    }

    public BigDecimal getIntegral()
    {
        return integral;
    }
    public void setRuleType(String ruleType)
    {
        this.ruleType = ruleType;
    }

    public String getRuleType()
    {
        return ruleType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("parentId", getParentId())
            .append("ruleTerms", getRuleTerms())
            .append("grade", getGrade())
            .append("oilName", getOilName())
            .append("saleAmt", getSaleAmt())
            .append("integral", getIntegral())
            .append("ruleType", getRuleType())
            .toString();
    }
}
